<%@ page import="pe.com.mowa.siscobsms.bean.proyecto" %>
<%@ page import="pe.com.mowa.siscobsms.datos.*" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.text.*" %>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@page import="pe.com.mowa.siscobsms.bean.persona"%>
<%@page import="pe.com.mowa.siscobsms.bean.analista"%>

<%@page import="pe.com.mowa.siscobsms.bean.pagoDelDia"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel="shortcut icon" type="image/ico" href="http://www.sprymedia.co.uk/media/images/favicon.ico">
		
		<title>TableTools example</title>
		<style type="text/css" title="currentStyle">
			@import "css/media/css/demo_page.css";
			@import "css/media/css/demo_table_report.css";
			@import "media/css/TableTools.css";
        </style>
		<script type="text/javascript" charset="utf-8" src="css/media/js/jquery.js"></script>
		<script type="text/javascript" charset="utf-8" src="css/media/js/jquery.dataTables.js"></script>
		<script type="text/javascript" charset="utf-8" src="media/js/ZeroClipboard.js"></script>
		<script type="text/javascript" charset="utf-8" src="media/js/TableTools.js"></script>
		<link rel="stylesheet" type="text/css" href="css/cuerpo.css" />
		
		<script type="text/javascript" charset="utf-8">
		
			$(document).ready( function () {
			
						
			
				$('#reportePrestamos').dataTable( {
					"sDom": 'T<"clear">lfrtip',
					"oTableTools": {
						"aButtons": [
							"copy",
							"csv",
							"xls",
							{
								"sExtends": "pdf",
								"sPdfOrientation": "landscape",
								"sPdfMessage": "Your custom message would go here."
							},
							"print"
						]
					}
				} );
			} );
		</script>
	</head>
<body id="dt_example" class="bodyReporte">



<div id="container">
			<div class="full_width big"></div>
<div >
  <table cellpadding="0" cellspacing="0" border="0" class="displayReporte" id="reportePrestamos">
	<thead>
		<tr>
			<th>Cod Prestamo</th>
			<th>Cliente</th>			
			<th>Monto prestado</th>
			<th>Monto total</th>
			<th>Fecha de prestamo</th>
			<th>Dias trans.</th>
			<th>Local</th>
			<th>Comentario</th>
			<th>Pago real</th>
			<th>Pago esperado</th>
			<th>Pago del dia</th>
		</tr>
		
	</thead>
	<tfoot>
		<tr>
			<th>Cod Prestamo</th>
			<th>Cliente</th>			
			<th>Monto prestado</th>
			<th>Monto total</th>
			<th>Fecha de prestamo</th>
			<th>Dias trans.</th>
			<th>Local</th>
			<th>Comentario</th>
			<th>Pago real</th>
			<th>Pago esperado</th>
			<th>Pago del dia</th>
			
		</tr>
	</tfoot>
	<tbody>

		
   	<%
		   		conTarifa cpr = new conTarifa();
		   		ArrayList pagosDia = cpr.getPagosDelDia();
		   		
		   		pagoDelDia pgd = new pagoDelDia();
		   		
		   		
		   		
		   		//out.print("pago del dia:"+pgd.getDiasTrans());
		   	   	
		   	  
		   	     		for (int i =0; i <pagosDia.size(); i++) {
		   	    
		   	     			pgd=(pagoDelDia) pagosDia.get(i);
		   	         		out.print("<tr class='odd_gradeX'>");
		   	         		out.print("<td>"+pgd.getPrestamo().getId()+"</td>");
		   	         		out.print("<td>"+pgd.getPrestamo().getPerson().getNombre()+"</td>");
		   	         		out.print("<td>"+pgd.getPrestamo().getMnentregado()+"</td>");
		   	         		out.print("<td>"+pgd.getPrestamo().getMntotal()+"</td>");
		   	         		out.print("<td>"+pgd.getPrestamo().getFecha()+"</td>");
		   	         		out.print("<td>"+pgd.getDiasTrans()+"</td>");
		   	         		out.print("<td>"+pgd.getPrestamo().getLocal().getNombre()+"</td>");
		   	         		out.print("<td>"+pgd.getPrestamo().getComentario()+"</td>");
		   	         		out.print("<td>"+pgd.getPagoReal()+"</td>");
		   	         		out.print("<td>"+pgd.getPagoEsperado()+"</td>");
		   	         		out.print("<td>"+pgd.getPagoDia()+"</td>");


		   	         		out.print("</tr>"); 
		   	   	  		  
		   	     		}
		   	%>
		
		
		
		
		
		
	</tbody>
</table>
  </div>
		
			

</div>
</body>
</html>